feat(web): enforce image limits with warning UX, clamp rectangle count, and add “Important Notice & Disclaimer”#11
Conversation
|
🚀 Preview is ready "https://Shimo-1999.github.io/rectangle-fitting/pr-preview-11/" This link auto-updates on every push to this PR. |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces image validation with user-facing warnings, enforces limits on rectangle count, and adds a disclaimer modal. The changes improve user experience by preventing browser crashes from oversized images while providing clear feedback when limits are exceeded.
Key changes:
- Added image size/resolution validation (15MB, 20MP, 8192px max dimensions) with warning UI
- Clamped rectangle count input to 1-5000 range with wheel event prevention
- Added modal disclaimer about potential browser issues with large images
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/js/script.js | Implements LIMITS constants, validation logic for images, warning UI system, and rectangle count clamping |
| web/index.html | Adds notice container, disclaimer modal, updates default rectangle count to 500, adds Bootstrap bundle script |
| README.md | Corrects license file path and adds disclaimer section |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🚀 Preview is ready "https://Shimo-1999.github.io/rectangle-fitting/pr-preview-11/" This link auto-updates on every push to this PR. |
No description provided.